<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

<!--    <div class="form-group" style="color: red">-->
<!--        <label class="control-label col-xs-12 col-sm-2"></label>-->
<!--        <div class="col-xs-12 col-sm-8">-->
<!--        * 团队选择是否需要调解员时，如果改变日期时请重新选择一下是否需要调解员-->
<!--        </div>-->
<!--    </div>-->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('预约类型')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select  name="row[type]" class="moshi form-control" >
                <option value="0" selected>个人</option>
                <option value="1" >团体</option>
            </select>
        </div>
    </div>





    <div class="form-group" style="display:none;">
        <label class="control-label col-xs-12 col-sm-2">{:__('User_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select name="row[user_id]" class="form-control selectpicker">
                <option value="2">2</option>
            </select>
        </div>
    </div>


    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name" data-rule="required" class="form-control" name="row[name]" type="text">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Mobile')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-mobile" data-rule="mobile" class="form-control" name="row[mobile]" type="text">
        </div>
    </div>



    <div class="form-group speak">
        <label class="control-label col-xs-12 col-sm-2">{:__('政治面貌')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select class="form-control " name="row[department]"  >
            <option value="" selected>--请选择政治面貌--</option>
            {foreach $department as $k=>$v}
            <option value="{$v}">{$v}</option>
            {/foreach}
            </select>
        </div>
    </div>


    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Venue')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select name="row[venue]" class="form-control selectpicker">
                <option value="A" selected>北山街馆区</option>
                <option value="B" >栖霞岭馆区</option>
            </select>
        </div>
    </div>



    <div class="form-group tuanti" style="display: none;">
        <label class="control-label col-xs-12 col-sm-2">{:__('Company')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-company"  class="form-control" name="row[company]" type="text">
        </div>
    </div>

    <div class="form-group tuanti" style="display: none;">
        <label class="control-label col-xs-12 col-sm-2">{:__('Position_type')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select class="form-control " name="row[position_type]"  >
                <option value="" selected>--请选择单位类型--</option>
                    {foreach $position_type as $k=>$v}
                    <option value="{$v}">{$v}</option>
                    {/foreach}
            </select>
        </div>
    </div>
    <div class="form-group tuanti" style="display: none;">
        <label class="control-label col-xs-12 col-sm-2">{:__('Views')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-views"  class="form-control" name="row[views]" type="text" value="">
        </div>
    </div>


    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Day')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-day" data-rule="required" class="form-control" name="row[day]" type="date" placeholder="例子：2019-07-08">
        </div>
    </div>


<!--    <div class="form-group" >-->
<!--        <label class="control-label col-xs-12 col-sm-2">{:__('Between_time')}:</label>-->
<!--        <div class="col-xs-12 col-sm-8">-->
<!--            <select name="row[between_time]" class="form-control between_time">-->
<!--                {foreach $vistime as $k=>$val}-->
<!--                <option value="{$k}" >{$val}</option>-->
<!--                {/foreach}-->
<!--            </select>-->
<!--        </div>-->
<!--    </div>-->

    <div class="form-group tuanti"  style="display: none;">
        <label class="control-label col-xs-12 col-sm-2">{:__('讲解')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select name="row[explain]" class="explain form-control ">
                <option value="0" selected>不需要</option>
                <option value="1" >需要</option>
            </select>
        </div>
    </div>


    <div class="form-group  tuanti" style="display: none;">
        <label class="control-label col-xs-12 col-sm-2">{:__('讲解员')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select class="form-control tiaojie" name="row[admin_id]">
                <option value="" selected>--请选择--</option>
                {foreach $speak as $k=>$val}
                     <option value="{$k}" >{$val}</option>
                {/foreach}
            </select>
        </div>
    </div>


    <div class="form-group tuanti" style="display: none;">
        <label class="control-label col-xs-12 col-sm-2">{:__('预约时区')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select  name="row[dinner]" class="moshi form-control" >
                <option value="0" selected>上午</option>
                <option value="1" >下午</option>
            </select>
        </div>
    </div>



    <!--    <div class="form-group">-->
<!--        <label class="control-label col-xs-12 col-sm-2">{:__('Between_day')}:</label>-->
<!--        <div class="col-xs-12 col-sm-8">-->
<!--            <input id="c-between_day" data-rule="required" class="form-control" name="row[between_day]" type="text">-->
<!--        </div>-->
<!--    </div>-->

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('预计到达时间')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input  data-rule="required" class="form-control"   name="row[arrival_time]" type="text" >
        </div>
    </div>


    <div class="form-group tuanti"  style="display: none;">
        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select name="row[status]" class="form-control  ">
                <option value="1" selected>预约</option>
<!--                <option value="5" >取消</option>-->
            </select>
        </div>
    </div>


    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>



</form>
<script src="/lib/jquery/1.9.1/jquery.min.js"></script>
<script>
  // $(".explain").change(function(){
  //             if($(".explain").val() == 1){
  //                 if($("#c-day").val() == ""){
  //                     return false
  //                 }
  //                 var time = $("#c-day").val();
  //                 var Between_time =  $(".between_time").val();
  //                 var url = "Visiting/gettiaojie?day="+time+"&between_time="+Between_time;
  //                         $.ajax({
  //                             type: "GET",
  //                             dataType: "json",
  //                             url: url,
  //                             success: function (data) {
  //                                 if(data.data == ""){
  //                                     $(".speak").css("display","none");
  //                                       return;
  //                                 }else{
  //                                     if(data.code == 1 ){
  //                                         // console.log(data);
  //                                         $(".tiaojie").find("option").remove();
  //                                         $.each(data.data,function(i,val){
  //                                             $(".tiaojie").append(
  //                                                 '<option value="'+val.users.id+'" >' +
  //                                                 val.users.nickname+ "</option>")
  //                                         })
  //                                         $(".speak").css("display","block");
  //                                     }
  //                                 }
  //                             }
  //                         })
  //                 }else{
  //                 $(".speak").css("display","none");
  //             }
  //     }
  // )

  $(".moshi").change(function(){
          if($(".moshi").val() == 1){
              $(".tuanti").css("display","block");
              $(".speak").css("display","none");
          }else{
              // $(".speakk").css("display","none");
              $(".speak").css("display","block");
              $(".tuanti").css("display","none");
          }
      }

  )

</script>